# - Find Poco libraries
# Go hunting for poco components
# Defines:
#  POCO_INCLUDE_DIR
#  POCO_LIB_DIR


# To find boost on Windows, use DEVLIBS_PATH variable set by mingwenv.bat

FIND_PATH(POCO_INCLUDE_DIR  Poco/Poco.h 
                            /usr/include 
                            /usr/local/include
                            $ENV{POCO_DIR}
                            $ENV{DEVLIBS_PATH}/include
         )

FIND_LIBRARY( POCO_LIB_DIR NAMES PocoFoundation 	 
              PATHS /usr/lib /usr/local/lib $ENV{DEVLIBS_PATH}/lib ) 	 

              
IF (POCO_INCLUDE_DIR)
     MESSAGE(STATUS "Poco: FOUND  ( ${POCO_INCLUDE_DIR} )")
ELSE(POCO_INCLUDE_DIR)
     MESSAGE(FATAL_ERROR "Poco: NOT FOUND")
ENDIF (POCO_INCLUDE_DIR)

#INCLUDE_DIRECTORIES( ${POCO_INCLUDE_DIR} )

find_library(POCO_FOUNDATION PocoFoundation)
find_library(POCO_NET PocoNet)
find_library(POCO_UTIL PocoUtil)
set(POCO_LIBS   -lPocoUtil
                -lPocoNet
                -lPocoXML
                -lPocoFoundation
    )
if (WIN32)
  set (POCO_LIBS "-L$ENV{DEVLIBS_PATH}/lib ${POCO_LIBS} -lws2_32 -Wl,--allow-multiple-definition")
endif()



